package club.xyes.zkh.ecommerce.commons.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Table;

/**
 * Create by 郭文梁 2019/4/17 0017 10:12
 * CommodityImage
 * 商品图片实体类
 *
 * @author 郭文梁
 * @data 2019/4/17 0017
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Table(name = "t_commodity_image")
public class CommodityImage extends BaseEntity {
    /**
     * 商品ID
     */
    @Column(name = "commodity_id", length = 10, nullable = false)
    private Integer commodityId;
    /**
     * 关联的商品对象
     */
    private Commodity commodity;
    /**
     * 图片路径
     */
    @Column(name = "image_url", nullable = false)
    private String imageUrl;
    /**
     * 图片是否为绝对路径
     */
    @Column(name = "absolutely", nullable = false)
    private Boolean absolutely;
}
